Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPart


CommitRelinquishFocus

The CommitRelinquishFocus method should complete this part's relinquishing of ownership of the specified focus.

void CommitRelinquishFocus (in ODTypeToken focus, 
                            in ODFrame ownerFrame,
                            in ODFrame proposedFrame);
focus
A tokenized string representing the focus type to be relinquished, expressed as a 32-bit value.
ownerFrame
A reference to a display frame that currently possesses the focus.
proposedFrame
A reference to a frame that requested the focus.
DISCUSSION
The focus parameter must be the tokenized form of one of the focus constants (kODClipboardFocus, kODKeyFocus, kODMenuFocus, kODModalFocus, kODMouseFocus, kODScrollingFocus, or kODSelectionFocus) or the tokenized form of a part-specific focus type. You can call the session object's Tokenize method to obtain a token corresponding to one of these constants.

Your part's CommitRelinquishFocus method should complete the process initiated when OpenDoc first called your part's BeginRelinquishFocus method. If all focus owners in a given request for a focus set are willing to relinquish focus, OpenDoc calls each part's CommitRelinquishFocus method.

Your part's CommitRelinquishFocus method should perform any actions necessary to relinquish the specified focus to OpenDoc. Some actions depend on the nature and implementation of the part itself, but others are standard. Your part's CommitRelinquishFocus method should remove menus or palettes of your part's frame, remove highlighting, and relinquish any external resources associated with the specified focus. Remember that the focus might be moving from one frame to another of the same part, so the exact actions can vary.

OVERRIDING
When you subclass ODPart, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.

EXCEPTIONS
kODErrInvalidFrame
The specified frame is not a display frame of this part.
SEE ALSO
The ODFocusType type (page 889).
The ODTypeToken type (page 877).
The ODPart::AbortRelinquishFocus method (page 475).
The ODPart::BeginRelinquishFocus method (page 482).
The ODSession::Tokenize method (page 622).
"The CommitRelinquishFocus Method" on page 91 in OpenDoc Cookbook.
"Required and optional ODPart overrides" on page 89 in OpenDoc Programmer's Guide.
"Requesting Foci" on page 208 in OpenDoc Programmer's Guide.
"Relinquishing Foci" on page 208 in OpenDoc Programmer's Guide.
"On Frame Activation" on page 211 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help